<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="js/swiper.min.css">
    <script src="js/swiper.min.js"></script>

    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .container {
            width: 100vw;
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        header,
        footer {
            background: #000;
            line-height: 50px;
            color: #fff;
            text-align: center;
        }

        section {
            flex: 1;
        }

        ul {
            list-style: none;
        }

        .swiper-wrapper {
            width: 100%;
            height: 0;
            background: #ccc;
            padding-bottom: 50%;
        }

        .swiper-slide img {
            width: 100%;
        }

        .swiper-pagination-bullet-active {
            background: orange;
        }
    </style>

</head>

<body>
    <div class='container'>

        <header>头部</header>
        <section>

            <div class="swiper-container">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <img src="img/1.jpg" alt="">
                    </div>
                    <div class="swiper-slide">
                        <img src="img/2.jpg" alt="">
                    </div>
                    <div class="swiper-slide">
                        <img src="img/3.jpg" alt="">
                    </div>
                </div>
                <div class="swiper-pagination"></div>
            </div>



        </section>
        <footer>底部</footer>

    </div>
    <script>
        new Swiper('.swiper-container', {
            loop: true,
            pagination: {
                el: '.swiper-pagination',
                type: 'fraction'
            }
        })
    </script>
</body>

</html>